Skip to content

Add gptel-reasoning-effort and add it to the transient menu#1338

Open
djr7C4 wants to merge 2 commits intokarthink:masterfrom
djr7C4:reasoning-effort
Open

Add gptel-reasoning-effort and add it to the transient menu#1338
djr7C4 wants to merge 2 commits intokarthink:masterfrom
djr7C4:reasoning-effort

Conversation

@djr7C4
Copy link
Copy Markdown
Contributor

@djr7C4 djr7C4 commented Apr 9, 2026

This PR implements adds a gptel-reasoning-effort variable and adds it to the
transient menu. It currently only supports OpenAI's responses API. I haven't
tested the gptel-org.el code yet and suspect that it is broken but I thought I'd
send what I have to see if you think the approach is reasonable before I invest
more effort.

Selecting reasoning effort from the transient menu is working for OpenAI models
through the responses API. If the approach seems good, I'll fix any issues with
the implementation in gptel-org.el and implement it for Gemini and Anthropic as
well. Adding it to gptel-openai.el is also possible but I'd have to investigate
how reasoning effort works for non-OpenAI models on platforms like OpenRouter.

@djr7C4
Copy link
Copy Markdown
Contributor Author

djr7C4 commented Apr 9, 2026

Also, the :reasoning-effort forms in the model definitions are valid types for cl-typep. That's why the first value is member. cl-typep also supports integer intervals which will be helpful for implementing reasoning effort for Anthropic and Gemini. When I do that, I'll also update gptel--transient-read-reasoning-effort to enforce the number read to the valid range (currently it accepts anything).

@karthink
Copy link
Copy Markdown
Owner

karthink commented Apr 9, 2026

Thanks for the PR @djr7C4, I'll take a look soon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants